
//导入service对象
import service from "../utils/request";

//一个接口封装一个函数


// 插入轮播图数据
// export function banner_add(payload = {}) {
//     return service.post('/banner/add', payload)
// }
//查看销售量TOP5实物商品
export function shuju_wuping(payload = {}) {
    return service.get('/shuju_wuping', { params: payload })
}

//实时访问量统计
export function shuju_liuliang_tongji(payload = {}) {
    return service.get('/shuju_liuliang_tongji', { params: payload })
}
//流量---各终端访问量趋势
export function shuju_liuliang_qushi(payload = {}) {
    return service.get('/shuju_liuliang_qushi', { params: payload })
}
//数据明细
export function shuju_liuliang_mingxi(payload = {}) {
    return service.get('/shuju_liuliang_mingxi', { params: payload })
}
// ------------------------------------------------------
//学习分析
export function shuju_xuexi_qushi(payload = {}) {
    return service.get('/shuju_xuexi_qushi', { params: payload })
}
//实时学习人数统计
export function shuju_xuexi_tongji(payload = {}) {
    return service.get('/shuju_xuexi_tongji', { params: payload })
}
// -----------------------------------------------------
//直播间实时在线人数
export function shuju_zhibo_renhsu(payload = {}) {
    return service.get('/shuju_zhibo_renhsu', { params: payload })
}
//直播间数据
export function shuju_zhibo_shuju(payload = {}) {
    return service.get('/shuju_zhibo_shuju', { params: payload })
}


//--------------------------------------------------------
//商品管理---列表
export function good_list(payload = {}) {
    return service.get('/good', { params: payload })
}
//商品管理---增加
export function good_add(payload = {}) {
    return service.post('/good', payload)
}

//删除
export function good_del(payload: any = {}) {
    return service.delete('/good/' + payload.id, payload)
}
//编辑
// export function good_edit(payload = {}) {
//     return service.post('/good', payload)
// }
// 编辑
export function good_edit(payload: any = {}) {
    return service.post('/good/' + payload.id, payload)
}

//查询
export function good_search(payload = {}) {
    return service.get('/good', { params: payload });
}

//--------------------------------------------------------
//资产管理---列表
export function zichan_list(payload = {}) {
    return service.get('/zichan_list', { params: payload })
}


// ---------------------------------------------------------------------------------------------------------------
// 外网测试

// //商品管理---列表
// export function good_list(payload = {}) {
//     return service.get('/good', { params: payload })
// }
// //商品管理---增加
// export function good_add(payload = {}) {
//     return service.post('/goodadd', payload)
// }

// //删除
// export function good_del(payload: any = {}) {
//     return service.delete('/gooddel/' + payload.id, payload)
// }

// //查询
// export function good_search(payload = {}) {
//     return service.get('/goodby', { params: payload });
// }